<?php
date_default_timezone_set('Asia/Manila');
$DBHost = "localhost";
$DBUser = "root";
$DBPass = "";
$DBName = "fms_db";

$dbhandle = mysql_connect($DBHost, $DBUser, $DBPass)
  or die("Couldn't connect to SQL Server on $DBHost");

$selected = mysql_select_db($DBName, $dbhandle)
  or die("Couldn't open database $DBName");

session_start();
$_SESSION['curr_page'] = substr($_SERVER["SCRIPT_NAME"],strrpos($_SERVER["SCRIPT_NAME"],"/")+1);
if(!isset($_SESSION['username']))
{
    $file = 'login.php';
    $host = $_SERVER[ 'HTTP_HOST' ];
    $uri = rtrim( dirname( $_SERVER[ 'PHP_SELF' ] ), '/\\' );
    //header('Location: http://' . $host . $uri . '/' . $file );
}


/*if(isset($_SESSION['username']) and isset($_SESSION['auth']))
{
}
else
{
 header( 'Location: login.php' );
}*/
?>